<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
// NDK
//$template_dir = $this->baseurl.'/templates/'.$this->template.'/assets/';
$template_dir = '/templates/'.$this->template.'/assets/';
$document	=& JFactory::getDocument();
jimport('mylibs.globalModel');
$globalModel = new globalModel();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>CAREITEC - <?php echo JSite::getPageTitle(); ?></title> 
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="<?php echo $document->getMetaData ('robots'); ?>" />
    <meta name="keywords" content="<?php echo $document->getMetaData ('keywords'); ?>" />
    <meta name="description" content="<?php echo $document->getMetaData ('description'); ?>" />
    <link href="<?php echo $template_dir; ?>images/favicon.jpg" type="image/x-icon" media="all" rel="shortcut icon" />    

    <link href="<?php echo $template_dir; ?>css/style.css" rel="stylesheet" type="text/css" /> 
    <link href="<?php echo $template_dir; ?>scripts/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" />
    <style>
        /* css for timepicker */
        .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
        .ui-timepicker-div dl{ text-align: left; }
        .ui-timepicker-div dl dt{ height: 25px; }
        .ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
        .ui-timepicker-div td { font-size: 90%; }
    </style>

    <script src="<?php echo $template_dir; ?>scripts/jquery.js" type="text/javascript"></script>    
    <script src="<?php echo $template_dir; ?>scripts/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script> 
    <script src="<?php echo $template_dir; ?>scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script> 
    <script type="text/javascript" src="<?php echo $template_dir; ?>scripts/tabs.js"></script>
    <?php if(1==0){ ?>
    <script type="text/javascript" src="<?php echo $template_dir; ?>scripts/list_images.js"></script>        
    <?php } ?>
    <script type="text/javascript" src="<?php echo $template_dir; ?>scripts/menu.js"></script>
    <script type="text/javascript">
        ddsmoothmenu.init({
            mainmenuid: "smoothmenu1", //menu DIV id
            orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
            classname: 'ddsmoothmenu', //class added to menu's outer DIV
            //customtheme: ["#1c5a80", "#18374a"],
            contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
        })
    </script>
    <script type="text/javascript">
        show_popup = function(str,fieldFocus){
            $('#alert_popup').show(100);
            $('#alert').html("<b style='color:#FF0000'>"+str+"</b>");
            //setTimeout('close_popup()',3000);
            $('#'+fieldFocus).focus();
        }
        close_popup = function(){
            $('#alert_popup').hide(500);
        }
    </script>
</head>
<body>
    <div id="alert_popup" style="display:none; position:fixed; top:0%; left:0%; width:100%; height:100%; background-color:black; z-index:10003; -moz-opacity:0.8; opacity:.80; filter:alpha(opacity = 80);">
        <div class="bg_alert" id="show_popup" style="position: fixed;top: 40%;left: 50%;z-index:10001;margin-left:-135px;">
            <div style="min-height:35px; padding-right:20px" id="alert"></div>
            <div class="m20t m35l"><a href="javascript:void(0);" onclick="close_popup();"><img src="<?php echo $template_dir; ?>images/bt_luk1.png" alt="" /></a></div>
        </div>
    </div>
    <?php if(JRequest::getVar('view') == "frontpage" ) : 
            $class_body='bg_margin_main';
            else : 
            $class_body='bg_margin_sub';
            endif; ?>
    <div id="page_margins" class="<?php echo $class_body; ?>">
    <div id="page">
    <div id="header">
        <div class="logo float_left">
            <a href="<?php echo JURI::base(); ?>">
                <img src="<?php echo $template_dir; ?>images/logo.png" alt="" />
            </a>
        </div>
        <div class="w490 float_right p20t">
            <div class="float_left p5t">
                <?php 
                // Job
                $item = $globalModel->getArticleJobItem();
                $link = $link = $globalModel->getLeftColumnArticleLink(139);//$item['id']);               
                $sitemap_link = 'index.php?option=com_jmsitemap&view=sitemap&Itemid=72';
                ?>
                <img src="<?php echo $template_dir; ?>images/main.png" alt="" /> <a href="<?php echo $link; ?>"><?php echo $item['title']; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<img src="<?php echo $template_dir; ?>images/link.png" alt="" /> <a href="<?php echo $sitemap_link; ?>"><?php echo JText::_('SITEMAP'); ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo JText::_('LANGUAGE'); ?>: <!--<a href="#"><img src="<?php echo $template_dir; ?>images/danish_flag.jpg" alt="" /></a> <a href="#"><img src="<?php echo $template_dir; ?>images/english_flag.jpg" alt="" /></a>-->{module Language Selection}
            </div>
            <div class="w240 float_right">
                <?php 
                $lang = JRequest::getVar('lang', 'da', 'get');
                switch($lang){
                case 'en':
                    $search = 'search...';
                    break;
                case 'da':
                    $search = 'søg…';
                    break;
                }
                ?>
                <form method="post" action="index.php" id="search_form" name="search_form"> 
                    <div class="bg_search float_left">                         
                        <input type="text" class="txt_search" id="searchword" name="searchword" value="<?php echo $search; ?>" />
                        <input type="hidden" value="search" name="task">
                        <input type="hidden" value="com_search" name="option">
                        <input type="hidden" value="72" name="Itemid">  
                        <input type="hidden" value="10" name="limit">
                    </div>
                    <div class="but_search float_left"><a id="search_submit" href="#"><img src="<?php echo $template_dir; ?>images/search_but.png" alt="" /></a></div>
                    <div class="cb"></div>
                </form>
            </div>
            <div class="cb"></div>
        </div>
        <div class="cb"></div>
        <div id="smoothmenu1">
            <jdoc:include type="modules" name="header" />

        </div>
    </div>
    <jdoc:include type="component" />   
    <script type="text/javascript">
    /* <![CDATA[ */          
        var text = '<?php echo $search; ?>'; 
        
        jQuery('#searchword').focus(function(){
            if(this.value == text){
                this.value = '';
            }    
        });
        
        jQuery('#searchword').blur(function(){
            if(this.value == ''){
                this.value = text;
            }    
        });
        
        jQuery('#search_submit').click(function(){
            jQuery('#search_form').submit();
        });
    /* ]]> */
    </script>
</body>
</html>
